package com.peycard.common;

import java.io.Serializable;

public class LinkDTO implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private long idLink;
	private long idReader;
	private long idUser;
	private long idCompany;
	private String serialNumber;
	private String user;
	private String tradename;

	public long getIdLink() {
		return idLink;
	}

	public long getIdReader() {
		return idReader;
	}

	public long getIdUser() {
		return idUser;
	}

	public long getIdCompany() {
		return idCompany;
	}

	public String getSerialNumber() {
		return serialNumber;
	}

	public String getUser() {
		return user;
	}

	public String getTradename() {
		return tradename;
	}

	public void setIdLink(long idLink) {
		this.idLink = idLink;
	}

	public void setIdReader(long idReader) {
		this.idReader = idReader;
	}

	public void setIdUser(long idUser) {
		this.idUser = idUser;
	}

	public void setIdCompany(long idCompany) {
		this.idCompany = idCompany;
	}

	public void setSerialNumber(String serialNumber) {
		this.serialNumber = serialNumber;
	}

	public void setUser(String user) {
		this.user = user;
	}

	public void setTradename(String tradename) {
		this.tradename = tradename;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + (int) (idCompany ^ (idCompany >>> 32));
		result = prime * result + (int) (idLink ^ (idLink >>> 32));
		result = prime * result + (int) (idReader ^ (idReader >>> 32));
		result = prime * result + (int) (idUser ^ (idUser >>> 32));
		result = prime * result
				+ ((serialNumber == null) ? 0 : serialNumber.hashCode());
		result = prime * result
				+ ((tradename == null) ? 0 : tradename.hashCode());
		result = prime * result + ((user == null) ? 0 : user.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		LinkDTO other = (LinkDTO) obj;
		if (idCompany != other.idCompany)
			return false;
		if (idLink != other.idLink)
			return false;
		if (idReader != other.idReader)
			return false;
		if (idUser != other.idUser)
			return false;
		if (serialNumber == null) {
			if (other.serialNumber != null)
				return false;
		} else if (!serialNumber.equals(other.serialNumber))
			return false;
		if (tradename == null) {
			if (other.tradename != null)
				return false;
		} else if (!tradename.equals(other.tradename))
			return false;
		if (user == null) {
			if (other.user != null)
				return false;
		} else if (!user.equals(other.user))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "LinkDTO [idLink=" + idLink + ", idReader=" + idReader
				+ ", idUser=" + idUser + ", idCompany=" + idCompany
				+ ", serialNumber=" + serialNumber + ", user=" + user
				+ ", tradename=" + tradename + "]";
	}

}
